home *** CD-ROM | disk | FTP | other *** search
Text File | 1997-02-13 | 8.5 KB | 362 lines | [TEXT/MPS ] |
-
- /*
- * This file was generated by the SOM Compiler.
- * FileName: Document.xh.
- * Generated using:
- * SOM Precompiler somipc: 2.18
- * SOM Emitter emitxh.dll: 2.33
- */
-
- /*
- *
- * Classes defined in this interface
- *
- */
-
-
- #ifndef SOM_ODDocument_xh
- #define SOM_ODDocument_xh
-
- class ODDocument;
-
- #define ODDocument_MajorVersion 1
- #define ODDocument_MinorVersion 0
-
- /* C++ SOM defs */
- #include <somcls.xh>
- #include <somcm.xh>
-
- /* C++ parent defs */
- #ifndef SOM_ODRefCntObject_xh
- #include <RefCtObj.xh>
- #endif
-
- #ifndef ODDocument_API
- #define ODDocument_API
- /*
- * -- The Class API
- */
-
- /*
- * Start of user-defined types:
- */
- class SOMClass;
- class SOMObject;
- class ODFrame;
- class ODFacet;
- class ODObject;
- class ODExtension;
- class ODRefCntObject;
- class ODDocument;
- class ODContainer;
- class ODDraft;
- class ODStorageUnit;
-
- /*
- * End of user-defined types.
- */
-
- #ifdef OLDIBMSOMAPISUPPORT
- #define ODDocumentCClassData ODDocumentClassData
- #define ODDocumentNewClass(major,minor) somNewVersionedClassReference(ODDocument,major,minor)
- #endif
-
- /* define xxxMetaClass macro to facilitate (cls ## MetaClass) */
- #define ODDocumentMetaClass SOMClass
-
- #if PRAGMA_ALIGN_SUPPORTED
- # pragma options align=power
- #endif
-
- /* The API to the ODDocument class object, and the methods it introduces. */
- SOMEXTERN struct ODDocumentClassDataStructure {
- #ifdef OLDIBMSOMAPISUPPORT
- SOMClass *classObject; /* always zero, use somNewClassReference instead */
- #else
- long zero;
- #endif
- somStaticClassInfo *sci;
- somDToken instanceDataToken;
- long reserved [3];
- somMToken GetContainer;
- somMToken GetID;
- somMToken GetName;
- somMToken SetName;
- somMToken CollapseDrafts;
- somMToken AcquireDraft;
- somMToken Exists;
- somMToken AcquireBaseDraft;
- somMToken CreateDraft;
- somMToken SaveToAPrevDraft;
- somMToken SetBaseDraftFromForeignDraft;
- somMToken reserved1;
- somMToken reserved2;
- } SOMDLINK ODDocumentClassData;
-
- #if PRAGMA_ALIGN_SUPPORTED
- # pragma options align=reset
- #endif
-
- #if !defined(ODDocument_Class_Source) && !defined(SOM_Module_document_Source)
- #if PRAGMA_IMPORT_SUPPORTED
- #pragma import list ODDocumentClassData
- #endif
- #endif
-
-
- /*
- * -- Typedefs and inline method declarations for left path inherited methods
- * -- are omitted because this compilation had -museinheritedmethods in effect
- */
-
-
- /*
- * -- Typedefs for ODDocument Method Procedures
- */
- SOMEXTERN {
- typedef ODContainer* (* SOMLINK somTD_ODDocument_GetContainer)(ODDocument *somSelf, Environment *ev);
- typedef ODDocumentID (* SOMLINK somTD_ODDocument_GetID)(ODDocument *somSelf, Environment *ev);
- typedef ODDocumentName (* SOMLINK somTD_ODDocument_GetName)(ODDocument *somSelf, Environment *ev);
- typedef void (* SOMLINK somTD_ODDocument_SetName)(ODDocument *somSelf, Environment *ev,
- ODDocumentName* name);
- typedef ODDocument* (* SOMLINK somTD_ODDocument_CollapseDrafts)(ODDocument *somSelf, Environment *ev,
- ODDraft* from,
- ODDraft* to);
- typedef ODDraft* (* SOMLINK somTD_ODDocument_AcquireDraft)(ODDocument *somSelf, Environment *ev,
- ODDraftPermissions perms,
- ODDraftID id,
- ODDraft* draft,
- ODPositionCode posCode,
- ODBoolean release);
- typedef ODBoolean (* SOMLINK somTD_ODDocument_Exists)(ODDocument *somSelf, Environment *ev,
- ODDraftID id,
- ODDraft* draft,
- ODPositionCode posCode);
- typedef ODDraft* (* SOMLINK somTD_ODDocument_AcquireBaseDraft)(ODDocument *somSelf, Environment *ev,
- ODDraftPermissions perms);
- typedef ODDraft* (* SOMLINK somTD_ODDocument_CreateDraft)(ODDocument *somSelf, Environment *ev,
- ODDraft* below,
- ODBoolean releaseBelow);
- typedef void (* SOMLINK somTD_ODDocument_SaveToAPrevDraft)(ODDocument *somSelf, Environment *ev,
- ODDraft* from,
- ODDraft* to);
- typedef void (* SOMLINK somTD_ODDocument_SetBaseDraftFromForeignDraft)(ODDocument *somSelf, Environment *ev,
- ODDraft* draft);
- }
-
- #endif /* ODDocument_API */
-
-
- /*
- * -- This emitter treats Method Tokens as Thunks by default.
- * -- Use the sc modifier "nothunks" to change this default
- */
- #undef somresolve_
- #define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
-
- /*
- * -- The C++ Wrapper Class for ODDocument
- */
- class ODDocument : public ODRefCntObject
- {
- public:
-
- // ODDocument::new registers use of the class object, and then uses somNew
- // to allocate memory and load the object method table pointer.
- void *operator new(size_t size)
- {
- SOM_IgnoreWarning(size);
- // Allocate memory using the default allocator for ODDocument, and
- // clear mem & set method table pointer, call basic initialization
- #ifdef SOMCHKNULL
- void * __somResult = (void *)
- somNewObject(ODDocument);
- SOMCHKNULL(__somResult);
- return __somResult;
- #else
- return (void*) somNewObject(ODDocument);
- #endif
- }
-
- // ODDocument::delete uses the default deallocator for the object's class.
- void operator delete(void * obj)
- {
- if (obj) {
- SOM_Resolve(obj,SOMObject,somFree)
- ( (SOMObject*) obj );
- }
- }
-
- /* method: GetContainer */
- ODContainer* GetContainer(Environment *ev)
- {
- #ifdef SOMCHKEXCEPT
- ODContainer* __somResult =
- SOM_ResolveD(this,ODDocument,ODDocument,GetContainer)
- (this,ev);
- SOMCHKEXCEPT;
- return __somResult;
- #else
- return SOM_ResolveD(this,ODDocument,ODDocument,GetContainer)
- (this,ev);
- #endif
- }
-
- /* method: GetID */
- ODDocumentID GetID(Environment *ev)
- {
- #ifdef SOMCHKEXCEPT
- ODDocumentID __somResult =
- SOM_ResolveD(this,ODDocument,ODDocument,GetID)
- (this,ev);
- SOMCHKEXCEPT;
- return __somResult;
- #else
- return SOM_ResolveD(this,ODDocument,ODDocument,GetID)
- (this,ev);
- #endif
- }
-
- /* method: GetName */
- ODDocumentName GetName(Environment *ev)
- {
- #ifdef SOMCHKEXCEPT
- ODDocumentName __somResult =
- SOM_ResolveD(this,ODDocument,ODDocument,GetName)
- (this,ev);
- SOMCHKEXCEPT;
- return __somResult;
- #else
- return SOM_ResolveD(this,ODDocument,ODDocument,GetName)
- (this,ev);
- #endif
- }
-
- /* method: SetName */
- void SetName(Environment *ev,
- ODDocumentName* name)
- {
- SOM_ResolveD(this,ODDocument,ODDocument,SetName)
- (this,ev,name);
- #ifdef SOMCHKEXCEPT
- SOMCHKEXCEPT;
- #endif
- }
-
- /* method: CollapseDrafts */
- ODDocument* CollapseDrafts(Environment *ev,
- ODDraft* from,
- ODDraft* to)
- {
- #ifdef SOMCHKEXCEPT
- ODDocument* __somResult =
- SOM_ResolveD(this,ODDocument,ODDocument,CollapseDrafts)
- (this,ev,from,to);
- SOMCHKEXCEPT;
- return __somResult;
- #else
- return SOM_ResolveD(this,ODDocument,ODDocument,CollapseDrafts)
- (this,ev,from,to);
- #endif
- }
-
- /* method: AcquireDraft */
- ODDraft* AcquireDraft(Environment *ev,
- ODDraftPermissions perms,
- ODDraftID id,
- ODDraft* draft,
- ODPositionCode posCode,
- ODBoolean release)
- {
- #ifdef SOMCHKEXCEPT
- ODDraft* __somResult =
- SOM_ResolveD(this,ODDocument,ODDocument,AcquireDraft)
- (this,ev,perms,id,draft,posCode,release);
- SOMCHKEXCEPT;
- return __somResult;
- #else
- return SOM_ResolveD(this,ODDocument,ODDocument,AcquireDraft)
- (this,ev,perms,id,draft,posCode,release);
- #endif
- }
-
- /* method: Exists */
- ODBoolean Exists(Environment *ev,
- ODDraftID id,
- ODDraft* draft,
- ODPositionCode posCode)
- {
- #ifdef SOMCHKEXCEPT
- ODBoolean __somResult =
- SOM_ResolveD(this,ODDocument,ODDocument,Exists)
- (this,ev,id,draft,posCode);
- SOMCHKEXCEPT;
- return __somResult;
- #else
- return SOM_ResolveD(this,ODDocument,ODDocument,Exists)
- (this,ev,id,draft,posCode);
- #endif
- }
-
- /* method: AcquireBaseDraft */
- ODDraft* AcquireBaseDraft(Environment *ev,
- ODDraftPermissions perms)
- {
- #ifdef SOMCHKEXCEPT
- ODDraft* __somResult =
- SOM_ResolveD(this,ODDocument,ODDocument,AcquireBaseDraft)
- (this,ev,perms);
- SOMCHKEXCEPT;
- return __somResult;
- #else
- return SOM_ResolveD(this,ODDocument,ODDocument,AcquireBaseDraft)
- (this,ev,perms);
- #endif
- }
-
- /* method: CreateDraft */
- ODDraft* CreateDraft(Environment *ev,
- ODDraft* below,
- ODBoolean releaseBelow)
- {
- #ifdef SOMCHKEXCEPT
- ODDraft* __somResult =
- SOM_ResolveD(this,ODDocument,ODDocument,CreateDraft)
- (this,ev,below,releaseBelow);
- SOMCHKEXCEPT;
- return __somResult;
- #else
- return SOM_ResolveD(this,ODDocument,ODDocument,CreateDraft)
- (this,ev,below,releaseBelow);
- #endif
- }
-
- /* method: SaveToAPrevDraft */
- void SaveToAPrevDraft(Environment *ev,
- ODDraft* from,
- ODDraft* to)
- {
- SOM_ResolveD(this,ODDocument,ODDocument,SaveToAPrevDraft)
- (this,ev,from,to);
- #ifdef SOMCHKEXCEPT
- SOMCHKEXCEPT;
- #endif
- }
-
- /* method: SetBaseDraftFromForeignDraft */
- void SetBaseDraftFromForeignDraft(Environment *ev,
- ODDraft* draft)
- {
- SOM_ResolveD(this,ODDocument,ODDocument,SetBaseDraftFromForeignDraft)
- (this,ev,draft);
- #ifdef SOMCHKEXCEPT
- SOMCHKEXCEPT;
- #endif
- }
-
- }; /* ODDocument */
-
-
-
- #endif /* SOM_ODDocument_xh */
-